import { get } from '../utils/request'
export function getCoursesList(data, config) {
  return get('/api/v2/courses', data, config)
}
export function getNewCoursesList() {
  return get('/api/v2/courses', { category_id: 3 })
}
export function getHotCoursesList() {
  return get('/api/v2/courses', { category_id: 1 })
}
export function getBestCoursesList() {
  return get('/api/v2/courses', { category_id: 2 })
}
export function getRecommendCoursesList() {
  return get('/api/v2/courses', { category_id: 4 })
}
export function getCoursesDetail(id) {
  return get('/api/v2/course/' + id)
}
export function getCourseCatigories() {
  return get('/api/v2/course_categories')
}

export function reqSearchCourses (keywords, config) {
  return get('/api/v2/search', { keywords }, config)
}